<HTML><HEAD><TITLE>Manpage of zpool</TITLE>
</HEAD><BODY>
<H1>zpool</H1>
Section: System Administration Commands (8)<BR>Updated: 14 December 2012<BR>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT><A HREF="#lbAB">NAME</A><DD>
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
<DL>
<DT><A HREF="#lbAE">Virtual Devices (<B>vdev</B>s)</A><DD>
<DT><A HREF="#lbAF">Device Failure and Recovery</A><DD>
<DT><A HREF="#lbAG">Hot Spares</A><DD>
<DT><A HREF="#lbAH">Intent Log</A><DD>
<DT><A HREF="#lbAI">Cache Devices</A><DD>
<DT><A HREF="#lbAJ">Properties</A><DD>
<DT><A HREF="#lbAK">Subcommands</A><DD>
</DL>
<DT><A HREF="#lbAL">EXAMPLES</A><DD>
<DT><A HREF="#lbAM">EXIT STATUS</A><DD>
<DT><A HREF="#lbAN">ENVIRONMENT VARIABLES</A><DD>
<DT><A HREF="#lbAO">SEE ALSO</A><DD>
</DL>
<HR>
<A HREF="../index.html">Return to Main Contents</A><HR>

<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>

zpool - configures ZFS storage pools
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>

<P>

<PRE>
<B>zpool</B> [<B>-?</B>]
</PRE>

<P>
<P>

<PRE>
<B>zpool add</B> [<B>-fgLnP</B>] [<B>-o</B> <I>property=value</I>] <I>pool</I> <I>vdev</I> ...
</PRE>

<P>
<P>

<PRE>
<B>zpool attach</B> [<B>-f</B>] [<B>-o</B> <I>property=value</I>] <I>pool</I> <I>device</I> <I>new_device</I>
</PRE>

<P>
<P>

<PRE>
<B>zpool clear</B> <I>pool</I> [<I>device</I>]
</PRE>

<P>
<P>

<PRE>
<B>zpool create</B> [<B>-fnd</B>] [<B>-o</B> <I>property=value</I>] ... [<B>-O</B> <I>file-system-property=value</I>]
     ... [<B>-m</B> <I>mountpoint</I>] [<B>-R</B> <I>root</I>] [<B>-t</B> <I>tname</I>] <I>pool</I> <I>vdev</I> ...
</PRE>

<P>
<P>

<PRE>
<B>zpool destroy</B> [<B>-f</B>] <I>pool</I>
</PRE>

<P>
<P>

<PRE>
<B>zpool detach</B> <I>pool</I> <I>device</I>
</PRE>

<P>
<P>

<PRE>
<B>zpool events</B> [<B>-vHfc</B>] [<I>pool</I>] ...
</PRE>

<P>
<P>

<PRE>
<B>zpool export</B> [<B>-a</B>] [<B>-f</B>] <I>pool</I> ...
</PRE>

<P>
<P>

<PRE>
<B>zpool get</B> [<B>-pH</B>] &quot;<I>all</I>&quot; | <I>property</I>[,...] <I>pool</I> ...
</PRE>

<P>
<P>

<PRE>
<B>zpool history</B> [<B>-il</B>] [<I>pool</I>] ...
</PRE>

<P>
<P>

<PRE>
<B>zpool import</B> [<B>-d</B> <I>dir</I>] [<B>-D</B>]
</PRE>

<P>
<P>

<PRE>
<B>zpool import</B> [<B>-o </B><I>mntopts</I>] [<B>-o</B> <I>property=value</I>] ... [<B>-d</B> <I>dir</I> | <B>-c</B> <I>cachefile</I>]
     [<B>-D</B>] [<B>-f</B>] [<B>-m</B>] [<B>-N</B>] [<B>-R</B> <I>root</I>] [<B>-F</B> [<B>-n</B>] [<B>-X</B>] [<B>-T</B>]] <B>-a</B>
</PRE>

<P>
<P>

<PRE>
<B>zpool import</B> [<B>-o </B><I>mntopts</I>] [<B>-o</B> <I>property=value</I>] ... [<B>-d</B> <I>dir</I> | <B>-c</B> <I>cachefile</I>]
     [<B>-D</B>] [<B>-f</B>] [<B>-m</B>] [<B>-R</B> <I>root</I>] [<B>-F</B> [<B>-n</B>] [<B>-X</B>] [<B>-T</B>]] [<B>-t</B>]] <I>pool</I> |<I>id</I> [<I>newpool</I>]
</PRE>

<P>
<P>

<PRE>
<B>zpool iostat</B> [<B>-T</B> d | u ] [<B>-gLPvy</B>] [<I>pool</I>] ... [<I>interval</I>[<I>count</I>]]
</PRE>

<P>
<P>

<PRE>
<B>zpool labelclear</B> [<B>-f</B>] <I>device</I>
</PRE>

<P>
<P>

<PRE>
<B>zpool list</B> [<B>-T</B> d | u ] [<B>-HgLPv</B>] [<B>-o</B> <I>property</I>[,...]] [<I>pool</I>] ...
     [<I>interval</I>[<I>count</I>]]
</PRE>

<P>
<P>

<PRE>
<B>zpool offline</B> [<B>-t</B>] <I>pool</I> <I>device</I> ...
</PRE>

<P>
<P>

<PRE>
<B>zpool online</B> <I>pool</I> <I>device</I> ...
</PRE>

<P>
<P>

<PRE>
<B>zpool reguid</B> <I>pool</I>
</PRE>

<P>
<P>

<PRE>
<B>zpool reopen</B> <I>pool</I>
</PRE>

<P>
<P>

<PRE>
<B>zpool remove</B> <I>pool</I> <I>device</I> ...
</PRE>

<P>
<P>

<PRE>
<B>zpool replace</B> [<B>-f</B>] [<B>-o</B> <I>property=value</I>]  <I>pool</I> <I>device</I> [<I>new_device</I>]
</PRE>

<P>
<P>

<PRE>
<B>zpool scrub</B> [<B>-s</B>] <I>pool</I> ...
</PRE>

<P>
<P>

<PRE>
<B>zpool set</B> <I>property</I>=<I>value</I> <I>pool</I>
</PRE>

<P>
<P>

<PRE>
<B>zpool split</B> [<B>-gLnP</B>] [<B>-R</B> <I>altroot</I>] [<B>-o</B> <I>property=value</I>] <I>pool</I> <I>newpool</I> [<I>device</I> ...]
</PRE>

<P>
<P>

<PRE>
<B>zpool status</B> [<B>-gLPvxD</B>] [<B>-T</B> d | u] [<I>pool</I>] ... [<I>interval</I> [<I>count</I>]]
</PRE>

<P>
<P>

<PRE>
<B>zpool upgrade</B> 
</PRE>

<P>
<P>

<PRE>
<B>zpool upgrade</B> <B>-v</B>
</PRE>

<P>
<P>

<PRE>
<B>zpool upgrade</B> [<B>-V</B> <I>version</I>] <B>-a</B> | <I>pool</I> ...
</PRE>

<P>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>

<P>
<P>

The <B>zpool</B> command configures <B>ZFS</B> storage pools. A storage pool is a collection of devices that provides physical storage and data replication for <B>ZFS</B> datasets.
<P>
<P>

All datasets within a storage pool share the same space. See <B><A HREF="../man8/zfs.8.html">zfs</A></B>(8) for information on managing datasets.
<A NAME="lbAE">&nbsp;</A>
<H3>Virtual Devices (<B>vdev</B>s)</H3>

<P>
<P>

A &quot;virtual device&quot; describes a single device or a collection of devices organized according to certain performance and fault characteristics. The following virtual devices are supported:
<P>



<B>disk</B>

<DL COMPACT><DT><DD>

A block device, typically located under <B>/dev</B>. <B>ZFS</B> can use individual partitions, though the recommended mode of operation is to use whole disks. A disk can be specified by a full path, or it can be a shorthand name (the relative portion of the path under &quot;/dev&quot;). For example, &quot;sda&quot; is equivalent to &quot;/dev/sda&quot;. A whole disk can be specified by omitting the partition designation. When given a whole disk, <B>ZFS</B> automatically labels the disk, if necessary.
</DL>

<P>
<P>



<B>file</B>

<DL COMPACT><DT><DD>

A regular file. The use of files as a backing store is strongly discouraged. It is designed primarily for experimental purposes, as the fault tolerance of a file is only as good as the file system of which it is a part. A file must be specified by a full path.
</DL>

<P>
<P>



<B>mirror</B>

<DL COMPACT><DT><DD>

A mirror of two or more devices. Data is replicated in an identical fashion across all components of a mirror. A mirror with <I>N</I> disks of size <I>X</I> can hold <I>X</I> bytes and can withstand (<I>N-1</I>) devices failing before data integrity is compromised.
</DL>

<P>
<P>



<B>raidz</B>

<BR>


<B>raidz1</B>

<BR>


<B>raidz2</B>

<BR>


<B>raidz3</B>

<DL COMPACT><DT><DD>

A variation on <B>RAID-5</B> that allows for better distribution of parity and eliminates the &quot;<B>RAID-5</B> write hole&quot; (in which data and parity become inconsistent after a power loss). Data and parity is striped across all disks within a <B>raidz</B> group.
<P>
A <B>raidz</B> group can have single-, double- , or triple parity, meaning that the <B>raidz</B> group can sustain one, two, or three failures, respectively, without losing any data. The <B>raidz1</B> <B>vdev</B> type specifies a single-parity <B>raidz</B> group; the <B>raidz2</B> <B>vdev</B> type specifies a double-parity <B>raidz</B> group; and the <B>raidz3</B> <B>vdev</B> type specifies a triple-parity <B>raidz</B> group. The <B>raidz</B> <B>vdev</B> type is an alias for <B>raidz1</B>.
<P>
A <B>raidz</B> group with <I>N</I> disks of size <I>X</I> with <I>P</I> parity disks can hold approximately (<I>N-P</I>)*<I>X</I> bytes and can withstand <I>P</I> device(s) failing before data integrity is compromised. The minimum number of devices in a <B>raidz</B> group is one more than the number of parity disks. The recommended number is between 3 and 9 to help increase performance.
</DL>

<P>
<P>



<B>spare</B>

<DL COMPACT><DT><DD>

A special pseudo-<B>vdev</B> which keeps track of available hot spares for a pool. For more information, see the &quot;Hot Spares&quot; section.
</DL>

<P>
<P>



<B>log</B>

<DL COMPACT><DT><DD>

A separate-intent log device. If more than one log device is specified, then writes are load-balanced between devices. Log devices can be mirrored. However, <B>raidz</B> <B>vdev</B> types are not supported for the intent log. For more information, see the &quot;Intent Log&quot; section.
</DL>

<P>
<P>



<B>cache</B>

<DL COMPACT><DT><DD>

A device used to cache storage pool data. A cache device cannot be configured as a mirror or <B>raidz</B> group. For more information, see the &quot;Cache Devices&quot; section.
</DL>

<P>
<P>
<P>

Virtual devices cannot be nested, so a mirror or <B>raidz</B> virtual device can only contain files or disks. Mirrors of mirrors (or other combinations) are not allowed.
<P>
<P>

A pool can have any number of virtual devices at the top of the configuration (known as &quot;root vdevs&quot;). Data is dynamically distributed across all top-level devices to balance data among devices. As new virtual devices are added, <B>ZFS</B> automatically places data on the newly available devices.
<P>
<P>

Virtual devices are specified one at a time on the command line, separated by whitespace. The keywords &quot;mirror&quot; and &quot;raidz&quot; are used to distinguish where a group ends and another begins. For example, the following creates two root vdevs, each a mirror of two disks:
<P>

<PRE>
# <B>zpool create mypool mirror sda sdb mirror sdc sdd</B>
</PRE>


<P>
<P>
<A NAME="lbAF">&nbsp;</A>
<H3>Device Failure and Recovery</H3>

<P>
<P>

<B>ZFS</B> supports a rich set of mechanisms for handling device failure and data corruption. All metadata and data is checksummed, and <B>ZFS</B> automatically repairs bad data from a good copy when corruption is detected.
<P>
<P>

In order to take advantage of these features, a pool must make use of some form of redundancy, using either mirrored or <B>raidz</B> groups. While <B>ZFS</B> supports running in a non-redundant configuration, where each root vdev is simply a disk or file, this is strongly discouraged. A single case of bit corruption can render some or all of your data unavailable.
<P>
<P>

A pool's health status is described by one of three states: online, degraded, or faulted. An online pool has all devices operating normally. A degraded pool is one in which one or more devices have failed, but the data is still available due to a redundant configuration. A faulted pool has corrupted metadata, or one or more faulted devices, and insufficient replicas to continue functioning. 
<P>
<P>

The health of the top-level vdev, such as mirror or <B>raidz</B> device, is potentially impacted by the state of its associated vdevs, or component devices. A top-level vdev or component device is in one of the following states:
<P>



<B>DEGRADED</B>

<DL COMPACT><DT><DD>

One or more top-level vdevs is in the degraded state because one or more component devices are offline. Sufficient replicas exist to continue functioning.
<P>
One or more component devices is in the degraded or faulted state, but sufficient replicas exist to continue functioning. The underlying conditions are as follows:
<DL COMPACT><DT><DD>
<DL COMPACT>
<DT>
<DD>
o
The number of checksum errors exceeds acceptable levels and the device is degraded as an indication that something may be wrong. <B>ZFS</B> continues to use the device as necessary.
</DL>
</DL>

<DL COMPACT><DT><DD>
<DL COMPACT>
<DT>
<DD>
o
The number of I/O errors exceeds acceptable levels. The device could not be marked as faulted because there are insufficient replicas to continue functioning.
</DL>
</DL>

</DL>

<P>
<P>



<B>FAULTED</B>

<DL COMPACT><DT><DD>

One or more top-level vdevs is in the faulted state because one or more component devices are offline. Insufficient replicas exist to continue functioning. 
<P>
One or more component devices is in the faulted state, and insufficient replicas exist to continue functioning. The underlying conditions are as follows:
<DL COMPACT><DT><DD>
<DL COMPACT>
<DT>
<DD>
o
The device could be opened, but the contents did not match expected values. 
</DL>
</DL>

<DL COMPACT><DT><DD>
<DL COMPACT>
<DT>
<DD>
o
The number of I/O errors exceeds acceptable levels and the device is faulted to prevent further use of the device.
</DL>
</DL>

</DL>

<P>
<P>



<B>OFFLINE</B>

<DL COMPACT><DT><DD>

The device was explicitly taken offline by the &quot;<B>zpool offline</B>&quot; command.
</DL>

<P>
<P>



<B>ONLINE</B>

<DL COMPACT><DT><DD>

The device is online and functioning.
</DL>

<P>
<P>



<B>REMOVED</B>

<DL COMPACT><DT><DD>

The device was physically removed while the system was running. Device removal detection is hardware-dependent and may not be supported on all platforms.
</DL>

<P>
<P>



<B>UNAVAIL</B>

<DL COMPACT><DT><DD>

The device could not be opened. If a pool is imported when a device was unavailable, then the device will be identified by a unique identifier instead of its path since the path was never correct in the first place.
</DL>

<P>
<P>
<P>

If a device is removed and later re-attached to the system, <B>ZFS</B> attempts to put the device online automatically. Device attach detection is hardware-dependent and might not be supported on all platforms.
<A NAME="lbAG">&nbsp;</A>
<H3>Hot Spares</H3>

<P>
<P>

<B>ZFS</B> allows devices to be associated with pools as &quot;hot spares&quot;. These devices are not actively used in the pool, but when an active device fails, it is automatically replaced by a hot spare. To create a pool with hot spares, specify a &quot;spare&quot; <B>vdev</B> with any number of devices. For example, 
<P>

<PRE>
# zpool create pool mirror sda sdb spare sdc sdd
</PRE>


<P>
<P>
<P>
<P>

Spares can be shared across multiple pools, and can be added with the &quot;<B>zpool add</B>&quot; command and removed with the &quot;<B>zpool remove</B>&quot; command. Once a spare replacement is initiated, a new &quot;spare&quot; <B>vdev</B> is created within the configuration that will remain there until the original device is replaced. At this point, the hot spare becomes available again.
<P>
<P>

If a pool has a shared spare that is currently being used, the pool can not be exported since other pools may use this shared spare, which may lead to potential data corruption.
<P>
<P>

An in-progress spare replacement can be cancelled by detaching the hot spare. If the original faulted device is detached, then the hot spare assumes its place in the configuration, and is removed from the spare list of all active pools.
<P>
<P>

Spares cannot replace log devices.
<A NAME="lbAH">&nbsp;</A>
<H3>Intent Log</H3>

<P>
<P>

The <B>ZFS</B> Intent Log (<B>ZIL</B>) satisfies <B>POSIX</B> requirements for synchronous transactions. For instance, databases often require their transactions to be on stable storage devices when returning from a system call. <B>NFS</B> and other applications can also use <B>fsync</B>() to ensure data stability. By default, the intent log is allocated from blocks within the main pool. However, it might be possible to get better performance using separate intent log devices such as <B>NVRAM</B> or a dedicated disk. For example:
<P>

<PRE>
<B># zpool create pool sda sdb log sdc</B>
</PRE>


<P>
<P>
<P>
<P>

Multiple log devices can also be specified, and they can be mirrored. See the EXAMPLES section for an example of mirroring multiple log devices.
<P>
<P>

Log devices can be added, replaced, attached, detached, and imported and exported as part of the larger pool. Mirrored log devices can be removed by specifying the top-level mirror for the log.
<A NAME="lbAI">&nbsp;</A>
<H3>Cache Devices</H3>

<P>
<P>

Devices can be added to a storage pool as &quot;cache devices.&quot; These devices provide an additional layer of caching between main memory and disk. For read-heavy workloads, where the working set size is much larger than what can be cached in main memory, using cache devices allow much more of this working set to be served from low latency media. Using cache devices provides the greatest performance improvement for random read-workloads of mostly static content.
<P>
<P>

To create a pool with cache devices, specify a &quot;cache&quot; <B>vdev</B> with any number of devices. For example:
<P>

<PRE>
<B># zpool create pool sda sdb cache sdc sdd</B>
</PRE>


<P>
<P>
<P>
<P>

Cache devices cannot be mirrored or part of a <B>raidz</B> configuration. If a read error is encountered on a cache device, that read <B>I/O</B> is reissued to the original storage pool device, which might be part of a mirrored or <B>raidz</B> configuration.
<P>
<P>

The content of the cache devices is considered volatile, as is the case with other system caches.
<A NAME="lbAJ">&nbsp;</A>
<H3>Properties</H3>

<P>
<P>

Each pool has several properties associated with it. Some properties are read-only statistics while others are configurable and change the behavior of the pool. The following are read-only properties:
<P>



<B>available</B>

<DL COMPACT><DT><DD>

Amount of storage available within the pool. This property can also be referred to by its shortened column name, &quot;avail&quot;.
</DL>

<P>
<P>



<B>capacity</B>

<DL COMPACT><DT><DD>

Percentage of pool space used. This property can also be referred to by its shortened column name, &quot;cap&quot;.
</DL>

<P>
<P>



<B>expandsize</B>

<DL COMPACT><DT><DD>

Amount of uninitialized space within the pool or device that can be used to
increase the total capacity of the pool.  Uninitialized space consists of
any space on an EFI labeled vdev which has not been brought online
(i.e. zpool online -e).  This space occurs when a LUN is dynamically expanded.
</DL>

<P>
<P>



<B>fragmentation</B>

<DL COMPACT><DT><DD>

The amount of fragmentation in the pool.
</DL>

<P>
<P>



<B>free</B>

<DL COMPACT><DT><DD>

The amount of free space available in the pool.
</DL>

<P>
<P>



<B>freeing</B>

<DL COMPACT><DT><DD>

After a file system or snapshot is destroyed, the space it was using is
returned to the pool asynchronously. <B>freeing</B> is the amount of
space remaining to be reclaimed. Over time <B>freeing</B> will decrease
while <B>free</B> increases.
</DL>

<P>
<P>



<B>health</B>

<DL COMPACT><DT><DD>

The current health of the pool. Health can be &quot;<B>ONLINE</B>&quot;, &quot;<B>DEGRADED</B>&quot;, &quot;<B>FAULTED</B>&quot;, &quot; <B>OFFLINE</B>&quot;, &quot;<B>REMOVED</B>&quot;, or &quot;<B>UNAVAIL</B>&quot;.
</DL>

<P>
<P>



<B>guid</B>

<DL COMPACT><DT><DD>

A unique identifier for the pool.
</DL>

<P>
<P>



<B>size</B>

<DL COMPACT><DT><DD>

Total size of the storage pool.
</DL>

<P>
<P>



<B>unsupported@</B><I>feature_guid</I>

<DL COMPACT><DT><DD>

<P>
Information about unsupported features that are enabled on the pool. See
<B><A HREF="../man5/zpool-features.5.html">zpool-features</A></B>(5) for details.
</DL>

<P>
<P>



<B>used</B>

<DL COMPACT><DT><DD>

Amount of storage space used within the pool.
</DL>

<P>
<P>
<P>

The space usage properties report actual physical space available to the storage pool. The physical space can be different from the total amount of space that any contained datasets can actually use. The amount of space used in a <B>raidz</B> configuration depends on the characteristics of the data being written. In addition, <B>ZFS</B> reserves some space for internal accounting that the <B><A HREF="../man8/zfs.8.html">zfs</A></B>(8) command takes into account, but the <B>zpool</B> command does not. For non-full pools of a reasonable size, these effects should be invisible. For small pools, or pools that are close to being completely full, these discrepancies may become more noticeable.
<P>
<P>
<P>

The following property can be set at creation time:
<P>



<B>ashift</B>

<P>
<DL COMPACT><DT><DD>
Pool sector size exponent, to the power of 2 (internally referred to as &quot;ashift&quot;). I/O operations will be aligned to the specified size boundaries. Additionally, the minimum (disk) write size will be set to the specified size, so this represents a space vs. performance trade-off. The typical case for setting this property is when performance is important and the underlying disks use 4KiB sectors but report 512B sectors to the OS (for compatibility reasons); in that case, set <B>ashift=12</B> (which is 1&lt;&lt;12 = 4096).
<P>

For optimal performance, the pool sector size should be greater than or equal to the sector size of the underlying disks. Since the property cannot be changed after pool creation, if in a given pool, you <I>ever</I> want to use drives that <I>report</I> 4KiB sectors, you must set <B>ashift=12</B> at pool creation time.
<P>

Keep in mind is that the <B>ashift</B> is <I>vdev</I> specific and is not a <I>pool</I> global.  This means that when adding new vdevs to an existing pool you may need to specify the <B>ashift</B>.
</DL>

<P>
<P>
<P>

The following property can be set at creation time and import time:
<P>



<B>altroot</B>

<P>
<DL COMPACT><DT><DD>
Alternate root directory. If set, this directory is prepended to any mount points within the pool. This can be used when examining an unknown pool where the mount points cannot be trusted, or in an alternate boot environment, where the typical paths are not valid. <B>altroot</B> is not a persistent property. It is valid only while the system is up. Setting <B>altroot</B> defaults to using <B>cachefile</B>=none, though this may be overridden using an explicit setting.
</DL>

<P>
<P>
<P>

The following property can only be set at import time:
<P>



<B>readonly</B>=<B>on</B> | <B>off</B>

<P>
<DL COMPACT><DT><DD>
If set to <B>on</B>, the pool will be imported in read-only mode: Synchronous data in the intent log will not be accessible, properties of the pool can not be changed and datasets of the pool can only be mounted read-only.  The <B>readonly</B> property of its datasets will be implicitly set to <B>on</B>.
<P>
It can also be specified by its column name of <B>rdonly</B>.
<P>
To write to a read-only pool, a export and import of the pool is required.
</DL>

<P>
<P>
<P>

The following properties can be set at creation time and import time, and later changed with the <B>zpool set</B> command:
<P>



<B>autoexpand</B>=<B>on</B> | <B>off</B>

<P>
<DL COMPACT><DT><DD>
Controls automatic pool expansion when the underlying LUN is grown. If set to <B>on</B>, the pool will be resized according to the size of the expanded device. If the device is part of a mirror or <B>raidz</B> then all devices within that mirror/<B>raidz</B> group must be expanded before the new space is made available to the pool. The default behavior is <B>off</B>. This property can also be referred to by its shortened column name, <B>expand</B>.
</DL>

<P>
<P>



<B>autoreplace</B>=<B>on</B> | <B>off</B>

<P>
<DL COMPACT><DT><DD>
Controls automatic device replacement. If set to &quot;<B>off</B>&quot;, device replacement must be initiated by the administrator by using the &quot;<B>zpool replace</B>&quot; command. If set to &quot;<B>on</B>&quot;, any new device, found in the same physical location as a device that previously belonged to the pool, is automatically formatted and replaced. The default behavior is &quot;<B>off</B>&quot;. This property can also be referred to by its shortened column name, &quot;replace&quot;.
</DL>

<P>
<P>



<B>bootfs</B>=<I>pool</I>/<I>dataset</I>

<P>
<DL COMPACT><DT><DD>
Identifies the default bootable dataset for the root pool. This property is expected to be set mainly by the installation and upgrade programs.
</DL>

<P>
<P>



<B>cachefile</B>=<I>path</I> | <B>none</B>

<P>
<DL COMPACT><DT><DD>
Controls the location of where the pool configuration is cached. Discovering all pools on system startup requires a cached copy of the configuration data that is stored on the root file system. All pools in this cache are automatically imported when the system boots. Some environments, such as install and clustering, need to cache this information in a different location so that pools are not automatically imported. Setting this property caches the pool configuration in a different location that can later be imported with &quot;<B>zpool import -c</B>&quot;. Setting it to the special value &quot;<B>none</B>&quot; creates a temporary pool that is never cached, and the special value <B>''</B> (empty string) uses the default location. 
<P>
Multiple pools can share the same cache file. Because the kernel destroys and recreates this file when pools are added and removed, care should be taken when attempting to access this file. When the last pool using a <B>cachefile</B> is exported or destroyed, the file is removed.
</DL>

<P>
<P>



<B>comment</B>=<B></B><I>text</I>

<P>
<DL COMPACT><DT><DD>
A text string consisting of printable ASCII characters that will be stored such that it is available even if the pool becomes faulted.  An administrator can provide additional information about a pool using this property.
</DL>

<P>
<P>



<B>dedupditto</B>=<B></B><I>number</I>

<P>
<DL COMPACT><DT><DD>
Threshold for the number of block ditto copies. If the reference count for a deduplicated block increases above this number, a new ditto copy of this block is automatically stored. The default setting is 0 which causes no ditto copies to be created for deduplicated blocks.  The miniumum legal nonzero setting is 100.
</DL>

<P>
<P>



<B>delegation</B>=<B>on</B> | <B>off</B>

<P>
<DL COMPACT><DT><DD>
Controls whether a non-privileged user is granted access based on the dataset permissions defined on the dataset. See <B><A HREF="../man8/zfs.8.html">zfs</A></B>(8) for more information on <B>ZFS</B> delegated administration.
</DL>

<P>
<P>



<B>failmode</B>=<B>wait</B> | <B>continue</B> | <B>panic</B>

<P>
<DL COMPACT><DT><DD>
Controls the system behavior in the event of catastrophic pool failure. This condition is typically a result of a loss of connectivity to the underlying storage device(s) or a failure of all devices within the pool. The behavior of such an event is determined as follows:
<P>



<B>wait</B>

<DL COMPACT><DT><DD>

Blocks all <B>I/O</B> access until the device connectivity is recovered and the errors are cleared. This is the default behavior.
</DL>

<P>
<P>



<B>continue</B>

<DL COMPACT><DT><DD>

Returns <B>EIO</B> to any new write <B>I/O</B> requests but allows reads to any of the remaining healthy devices. Any write requests that have yet to be committed to disk would be blocked.
</DL>

<P>
<P>



<B>panic</B>

<DL COMPACT><DT><DD>

Prints out a message to the console and generates a system crash dump.
</DL>

<P>
</DL>

<P>
<P>


<B>feature@</B><I>feature_name</I>=<B>enabled</B>

<DL COMPACT><DT><DD>
The value of this property is the current state of <I>feature_name</I>. The
only valid value when setting this property is <B>enabled</B> which moves
<I>feature_name</I> to the enabled state. See <B><A HREF="../man5/zpool-features.5.html">zpool-features</A></B>(5) for
details on feature states.
</DL>

<P>
<P>



<B>listsnaps</B>=on | off

<P>
<DL COMPACT><DT><DD>
Controls whether information about snapshots associated with this pool is output when &quot;<B>zfs list</B>&quot; is run without the <B>-t</B> option. The default value is &quot;off&quot;.
</DL>

<P>
<P>



<B>version</B>=<I>version</I>

<P>
<DL COMPACT><DT><DD>
The current on-disk version of the pool. This can be increased, but never decreased. The preferred method of updating pools is with the &quot;<B>zpool upgrade</B>&quot; command, though this property can be used when a specific version is needed for backwards compatibility. Once feature flags are enabled on a pool this property will no longer have a value.
</DL>

<P>
<A NAME="lbAK">&nbsp;</A>
<H3>Subcommands</H3>

<P>
<P>

All subcommands that modify state are logged persistently to the pool in their original form.
<P>
<P>

The <B>zpool</B> command provides subcommands to create and destroy storage pools, add capacity to storage pools, and provide information about the storage pools. The following subcommands are supported:
<P>



<B>zpool</B> <B>-?</B>

<P>
<DL COMPACT><DT><DD>
Displays a help message.
</DL>

<P>
<P>



<B>zpool add</B> [<B>-fgLnP</B>] [<B>-o</B> <I>property=value</I>] <I>pool</I> <I>vdev</I> ...

<P>
<DL COMPACT><DT><DD>
Adds the specified virtual devices to the given pool. The <I>vdev</I> specification is described in the &quot;Virtual Devices&quot; section. The behavior of the <B>-f</B> option, and the device checks performed are described in the &quot;zpool create&quot; subcommand.
<P>



<B>-f</B>

<DL COMPACT><DT><DD>

Forces use of <B>vdev</B>s, even if they appear in use or specify a conflicting replication level. Not all devices can be overridden in this manner.
</DL>

<P>
<P>



<B>-g</B>

<DL COMPACT><DT><DD>

Display vdev GUIDs instead of the normal device names. These GUIDs can be used in place of device names for the zpool detach/offline/remove/replace commands.
</DL>

<P>
<P>



<B>-L</B>

<DL COMPACT><DT><DD>

Display real paths for vdevs resolving all symbolic links. This can be used to look up the current block device name regardless of the /dev/disk/ path used to open it.
</DL>

<P>
<P>



<B>-n</B>

<DL COMPACT><DT><DD>

Displays the configuration that would be used without actually adding the <B>vdev</B>s. The actual pool creation can still fail due to insufficient privileges or device sharing.
</DL>

<P>
<P>



<B>-P</B>

<DL COMPACT><DT><DD>

Display full paths for vdevs instead of only the last component of the path.  This can be used in conjunction with the <B>-L</B> flag.
</DL>

<P>
<P>



<B>-o</B> <I>property=value</I>

<P>
<DL COMPACT><DT><DD>
Sets the given pool properties. See the &quot;Properties&quot; section for a list of valid properties that can be set. The only property supported at the moment is <B>ashift</B>.  <B>Do note</B> that some properties (among them <B>ashift</B>) are <I>not</I> inherited from a previous vdev. They are vdev specific, not pool specific.
</DL>

<P>
Do not add a disk that is currently configured as a quorum device to a zpool. After a disk is in the pool, that disk can then be configured as a quorum device.
</DL>

<P>
<P>



<B>zpool attach</B> [<B>-f</B>] [<B>-o</B> <I>property=value</I>] <I>pool</I> <I>device</I> <I>new_device</I>

<P>
<DL COMPACT><DT><DD>
Attaches <I>new_device</I> to an existing <B>zpool</B> device. The existing device cannot be part of a <B>raidz</B> configuration. If <I>device</I> is not currently part of a mirrored configuration, <I>device</I> automatically transforms into a two-way mirror of <I>device</I> and <I>new_device</I>. If <I>device</I> is part of a two-way mirror, attaching <I>new_device</I> creates a three-way mirror, and so on. In either case, <I>new_device</I> begins to resilver immediately.
<P>



<B>-f</B>

<DL COMPACT><DT><DD>

Forces use of <I>new_device</I>, even if its appears to be in use. Not all devices can be overridden in this manner.
</DL>

<P>
<P>



<B>-o</B> <I>property=value</I>

<P>
<DL COMPACT><DT><DD>
Sets the given pool properties. See the &quot;Properties&quot; section for a list of valid properties that can be set. The only property supported at the moment is &quot;ashift&quot;.
</DL>

<P>
</DL>

<P>
<P>



<B>zpool clear</B> <I>pool</I> [<I>device</I>] ...

<P>
<DL COMPACT><DT><DD>
Clears device errors in a pool. If no arguments are specified, all device errors within the pool are cleared. If one or more devices is specified, only those errors associated with the specified device or devices are cleared.
</DL>

<P>
<P>



<B>zpool create</B> [<B>-fnd</B>] [<B>-o</B> <I>property=value</I>] ... [<B>-O</B> <I>file-system-property=value</I>] ... [<B>-m</B> <I>mountpoint</I>] [<B>-R</B> <I>root</I>] [<B>-t</B> <I>tname</I>] <I>pool</I> <I>vdev</I> ...

<P>
<DL COMPACT><DT><DD>
Creates a new storage pool containing the virtual devices specified on the command line. The pool name must begin with a letter, and can only contain alphanumeric characters as well as underscore (&quot;_&quot;), dash (&quot;-&quot;), period (&quot;.&quot;), colon (&quot;:&quot;), and space (&quot; &quot;). The pool names &quot;mirror&quot;, &quot;raidz&quot;, &quot;spare&quot; and &quot;log&quot; are reserved, as are names beginning with the pattern &quot;c[0-9]&quot;. The <B>vdev</B> specification is described in the &quot;Virtual Devices&quot; section.
<P>
The command verifies that each device specified is accessible and not currently in use by another subsystem. There are some uses, such as being currently mounted, or specified as the dedicated dump device, that prevents a device from ever being used by <B>ZFS</B>. Other uses, such as having a preexisting <B>UFS</B> file system, can be overridden with the <B>-f</B> option.
<P>
The command also checks that the replication strategy for the pool is consistent. An attempt to combine redundant and non-redundant storage in a single pool, or to mix disks and files, results in an error unless <B>-f</B> is specified. The use of differently sized devices within a single <B>raidz</B> or mirror group is also flagged as an error unless <B>-f</B> is specified.
<P>
Unless the <B>-R</B> option is specified, the default mount point is &quot;/<I>pool</I>&quot;. The mount point must not exist or must be empty, or else the root dataset cannot be mounted. This can be overridden with the <B>-m</B> option.
<P>
By default all supported features are enabled on the new pool unless the <B>-d</B> option is specified.
<P>



<B>-f</B>

<P>
<DL COMPACT><DT><DD>
Forces use of <B>vdev</B>s, even if they appear in use or specify a conflicting replication level. Not all devices can be overridden in this manner.
</DL>

<P>
<P>



<B>-n</B>

<P>
<DL COMPACT><DT><DD>
Displays the configuration that would be used without actually creating the pool. The actual pool creation can still fail due to insufficient privileges or device sharing.
</DL>

<P>
<P>



<B>-d</B>

<P>
<DL COMPACT><DT><DD>
Do not enable any features on the new pool. Individual features can be enabled by setting their corresponding properties to <B>enabled</B> with the <B>-o</B> option. See <B><A HREF="../man5/zpool-features.5.html">zpool-features</A></B>(5) for details about feature properties.
</DL>

<P>
<P>


<B>-o</B> <I>property=value</I> [<B>-o</B> <I>property=value</I>] ...

<P>
<DL COMPACT><DT><DD>
Sets the given pool properties. See the &quot;Properties&quot; section for a list of valid properties that can be set.
</DL>

<P>
<P>



<B>-O</B> <I>file-system-property=value</I>

<BR>


<B>[-O</B> <I>file-system-property=value</I>] ...

<P>
<DL COMPACT><DT><DD>
Sets the given file system properties in the root file system of the pool. See the &quot;Properties&quot; section of <B><A HREF="../man8/zfs.8.html">zfs</A></B>(8) for a list of valid properties that can be set.
</DL>

<P>
<P>



<B>-R</B> <I>root</I>

<P>
<DL COMPACT><DT><DD>
Equivalent to &quot;-o cachefile=none,altroot=<I>root</I>&quot;
</DL>

<P>
<P>



<B>-m</B> <I>mountpoint</I>

<P>
<DL COMPACT><DT><DD>
Sets the mount point for the root dataset. The default mount point is &quot;/<I>pool</I>&quot; or &quot;<B>altroot</B>/<I>pool</I>&quot; if <B>altroot</B> is specified. The mount point must be an absolute path, &quot;<B>legacy</B>&quot;, or &quot;<B>none</B>&quot;. For more information on dataset mount points, see <B><A HREF="../man8/zfs.8.html">zfs</A></B>(8).
</DL>

<P>
<P>



<B>-t</B> <I>tname</I>

<P>
<DL COMPACT><DT><DD>
Sets the in-core pool name to &quot;<B>tname</B>&quot; while the on-disk name will be the name specified as the pool name &quot;<B>pool</B>&quot;. This will set the default cachefile property to none. This is intended to handle name space collisions when creating pools for other systems, such as virtual machines or physical machines whose pools live on network block devices.
</DL>

<P>
</DL>

<P>
<P>



<B>zpool destroy</B> [<B>-f</B>] <I>pool</I>

<P>
<DL COMPACT><DT><DD>
Destroys the given pool, freeing up any devices for other use. This command tries to unmount any active datasets before destroying the pool.
<P>



<B>-f</B>

<DL COMPACT><DT><DD>

Forces any active datasets contained within the pool to be unmounted.
</DL>

<P>
</DL>

<P>
<P>



<B>zpool detach</B> <I>pool</I> <I>device</I>

<P>
<DL COMPACT><DT><DD>
Detaches <I>device</I> from a mirror. The operation is refused if there are no other valid replicas of the data.  If <I>device</I> may be re-added to the pool later on then consider the &quot;<B>zpool offline</B>&quot; command instead.
</DL>

<P>

<P>
<P>



<B>zpool events</B> [<B>-vHfc</B>] [<I>pool</I>] ...

<P>
<DL COMPACT><DT><DD>
Description of the different events generated by the ZFS kernel modules. See <B><A HREF="../man5/zfs-events.5.html">zfs-events</A></B>(5) for more information about the subclasses and event payloads that can be generated.
<P>
<P>



<B>-v</B>

<DL COMPACT><DT><DD>

Get a full detail of the events and what information is available about it.
</DL>

<P>
<P>



<B>-H</B>

<DL COMPACT><DT><DD>

Scripted mode. Do not display headers, and separate fields by a single tab instead of arbitrary space.
</DL>

<P>
<P>



<B>-f</B>

<DL COMPACT><DT><DD>

Follow mode.
</DL>

<P>
<P>



<B>-c</B>

<DL COMPACT><DT><DD>

Clear all previous events.
</DL>

<P>
</DL>

<P>
<P>



<B>zpool export</B> [<B>-a</B>] [<B>-f</B>] <I>pool</I> ...

<P>
<DL COMPACT><DT><DD>
Exports the given pools from the system. All devices are marked as exported, but are still considered in use by other subsystems. The devices can be moved between systems (even those of different endianness) and imported as long as a sufficient number of devices are present.
<P>
Before exporting the pool, all datasets within the pool are unmounted. A pool can not be exported if it has a shared spare that is currently being used.
<P>
For pools to be portable, you must give the <B>zpool</B> command whole disks, not just partitions, so that <B>ZFS</B> can label the disks with portable <B>EFI</B> labels. Otherwise, disk drivers on platforms of different endianness will not recognize the disks.
<P>



<B>-a</B>

<DL COMPACT><DT><DD>

Exports all pools imported on the system.
</DL>

<P>
<P>



<B>-f</B>

<DL COMPACT><DT><DD>

Forcefully unmount all datasets, using the &quot;<B>unmount -f</B>&quot; command.
<P>
This command will forcefully export the pool even if it has a shared spare that is currently being used. This may lead to potential data corruption.
</DL>

<P>
</DL>

<P>
<P>



<B>zpool get</B> [<B>-p</B>] &quot;<I>all</I>&quot; | <I>property</I>[,...] <I>pool</I> ...

<P>
<DL COMPACT><DT><DD>
Retrieves the given list of properties (or all properties if &quot;<B>all</B>&quot; is used) for the specified storage pool(s). These properties are displayed with the following fields:
<P>

<PRE>
       name          Name of storage pool
        property      Property name
        value         Property value
        source        Property source, either 'default' or 'local'.
</PRE>


<P>
<P>
See the &quot;Properties&quot; section for more information on the available pool properties.
<P>



<B>-p</B>

<DL COMPACT><DT><DD>

Display numbers in parseable (exact) values.
</DL>

<P>
<P>



<B>-H</B>

<DL COMPACT><DT><DD>

Scripted mode. Do not display headers, and separate fields by a single tab instead of arbitrary space.
</DL>

<P>
</DL>

<P>
<P>



<B>zpool history</B> [<B>-il</B>] [<I>pool</I>] ...

<P>
<DL COMPACT><DT><DD>
Displays the command history of the specified pools or all pools if no pool is specified.
<P>



<B>-i</B>

<DL COMPACT><DT><DD>

Displays internally logged <B>ZFS</B> events in addition to user initiated events.
</DL>

<P>
<P>



<B>-l</B>

<DL COMPACT><DT><DD>

Displays log records in long format, which in addition to standard format includes, the user name, the hostname, and the zone in which the operation was performed.
</DL>

<P>
</DL>

<P>
<P>



<B>zpool import</B> [<B>-d</B> <I>dir</I> | <B>-c</B> <I>cachefile</I>] [<B>-D</B>]

<P>
<DL COMPACT><DT><DD>
Lists pools available to import. If the <B>-d</B> option is not specified, this command searches for devices in &quot;/dev&quot;. The <B>-d</B> option can be specified multiple times, and all directories are searched. If the device appears to be part of an exported pool, this command displays a summary of the pool with the name of the pool, a numeric identifier, as well as the <I>vdev</I> layout and current health of the device for each device or file. Destroyed pools, pools that were previously destroyed with the &quot;<B>zpool destroy</B>&quot; command, are not listed unless the <B>-D</B> option is specified. 
<P>
The numeric identifier is unique, and can be used instead of the pool name when multiple exported pools of the same name are available.
<P>



<B>-c</B> <I>cachefile</I>

<DL COMPACT><DT><DD>

Reads configuration from the given <B>cachefile</B> that was created with the &quot;<B>cachefile</B>&quot; pool property. This <B>cachefile</B> is used instead of searching for devices.
</DL>

<P>
<P>



<B>-d</B> <I>dir</I>

<DL COMPACT><DT><DD>

Searches for devices or files in <I>dir</I>. The <B>-d</B> option can be specified multiple times. 
</DL>

<P>
<P>



<B>-D</B>

<DL COMPACT><DT><DD>

Lists destroyed pools only.
</DL>

<P>
</DL>

<P>
<P>



<B>zpool import</B> [<B>-o</B> <I>mntopts</I>] [ <B>-o</B> <I>property</I>=<I>value</I>] ... [<B>-d</B> <I>dir</I> | <B>-c</B> <I>cachefile</I>] [<B>-D</B>] [<B>-f</B>] [<B>-m</B>] [<B>-N</B>] [<B>-R</B> <I>root</I>] [<B>-F</B> [<B>-n</B>]] <B>-a</B>

<P>
<DL COMPACT><DT><DD>
Imports all pools found in the search directories. Identical to the previous command, except that all pools with a sufficient number of devices available are imported. Destroyed pools, pools that were previously destroyed with the &quot;<B>zpool destroy</B>&quot; command, will not be imported unless the <B>-D</B> option is specified.
<P>



<B>-o</B> <I>mntopts</I>

<DL COMPACT><DT><DD>

Comma-separated list of mount options to use when mounting datasets within the pool. See <B><A HREF="../man8/zfs.8.html">zfs</A></B>(8) for a description of dataset properties and mount options.
</DL>

<P>
<P>



<B>-o</B> <I>property=value</I>

<DL COMPACT><DT><DD>

Sets the specified property on the imported pool. See the &quot;Properties&quot; section for more information on the available pool properties.
</DL>

<P>
<P>



<B>-c</B> <I>cachefile</I>

<DL COMPACT><DT><DD>

Reads configuration from the given <B>cachefile</B> that was created with the &quot;<B>cachefile</B>&quot; pool property. This <B>cachefile</B> is used instead of searching for devices.
</DL>

<P>
<P>



<B>-d</B> <I>dir</I>

<DL COMPACT><DT><DD>

Searches for devices or files in <I>dir</I>. The <B>-d</B> option can be specified multiple times. This option is incompatible with the <B>-c</B> option.
</DL>

<P>
<P>



<B>-D</B>

<DL COMPACT><DT><DD>

Imports destroyed pools only. The <B>-f</B> option is also required.
</DL>

<P>
<P>



<B>-f</B>

<DL COMPACT><DT><DD>

Forces import, even if the pool appears to be potentially active.
</DL>

<P>
<P>



<B>-F</B>

<DL COMPACT><DT><DD>
Recovery mode for a non-importable pool. Attempt to return the pool to an importable state by discarding the last few transactions. Not all damaged pools can be recovered by using this option. If successful, the data from the discarded transactions is irretrievably lost. This option is ignored if the pool is importable or already imported.
</DL>

<P>
<P>



<B>-a</B>

<DL COMPACT><DT><DD>

Searches for and imports all pools found. 
</DL>

<P>
<P>



<B>-m</B>

<DL COMPACT><DT><DD>
Allows a pool to import when there is a missing log device.
</DL>

<P>
<P>



<B>-R</B> <I>root</I>

<DL COMPACT><DT><DD>

Sets the &quot;<B>cachefile</B>&quot; property to &quot;<B>none</B>&quot; and the &quot;<I>altroot</I>&quot; property to &quot;<I>root</I>&quot;.
</DL>

<P>
<P>



<B>-N</B>

<DL COMPACT><DT><DD>
Import the pool without mounting any file systems.
</DL>

<P>
<P>



<B>-n</B>

<DL COMPACT><DT><DD>
Used with the <B>-F</B> recovery option. Determines whether a non-importable pool can be made importable again, but does not actually perform the pool recovery. For more details about pool recovery mode, see the <B>-F</B> option, above.
</DL>

<P>
<P>



<B>-X</B>

<DL COMPACT><DT><DD>
Used with the <B>-F</B> recovery option. Determines whether extreme measures to find a valid txg should take place.  This allows the pool to be rolled back to a txg which is no longer guaranteed to be consistent.  Pools imported at an inconsistent txg may contain uncorrectable checksum errors.  For more details about pool recovery mode, see the <B>-F</B> option, above.
<B>WARNING</B>: This option can be extremely hazardous to the health of your pool and should only be used as a last resort.
</DL>

<P>
<P>



<B>-T</B>

<DL COMPACT><DT><DD>
Specify the txg to use for rollback.  Implies <B>-FX</B>. For more details about pool recovery mode, see the <B>-X</B> option, above.
<B>WARNING</B>: This option can be extremely hazardous to the health of your pool and should only be used as a last resort.
</DL>

<P>
</DL>

<P>
<P>



<B>zpool import</B> [<B>-o</B> <I>mntopts</I>] [ <B>-o</B> <I>property</I>=<I>value</I>] ... [<B>-d</B> <I>dir</I> | <B>-c</B> <I>cachefile</I>] [<B>-D</B>] [<B>-f</B>] [<B>-m</B>] [<B>-R</B> <I>root</I>] [<B>-F</B> [<B>-n</B>]] [<B>-t</B>]] <I>pool</I> | <I>id</I> [<I>newpool</I>]

<P>
<DL COMPACT><DT><DD>
Imports a specific pool. A pool can be identified by its name or the numeric identifier. If <I>newpool</I> is specified, the pool is imported using the name <I>newpool</I>. Otherwise, it is imported with the same name as its exported name.
<P>
If a device is removed from a system without running &quot;<B>zpool export</B>&quot; first, the device appears as potentially active. It cannot be determined if this was a failed export, or whether the device is really in use from another host. To import a pool in this state, the <B>-f</B> option is required.
<P>



<B>-o</B> <I>mntopts</I>

<P>
<DL COMPACT><DT><DD>
Comma-separated list of mount options to use when mounting datasets within the pool. See <B><A HREF="../man8/zfs.8.html">zfs</A></B>(8) for a description of dataset properties and mount options.
</DL>

<P>
<P>



<B>-o</B> <I>property=value</I>

<P>
<DL COMPACT><DT><DD>
Sets the specified property on the imported pool. See the &quot;Properties&quot; section for more information on the available pool properties.
</DL>

<P>
<P>



<B>-c</B> <I>cachefile</I>

<P>
<DL COMPACT><DT><DD>
Reads configuration from the given <B>cachefile</B> that was created with the &quot;<B>cachefile</B>&quot; pool property. This <B>cachefile</B> is used instead of searching for devices.
</DL>

<P>
<P>



<B>-d</B> <I>dir</I>

<P>
<DL COMPACT><DT><DD>
Searches for devices or files in <I>dir</I>. The <B>-d</B> option can be specified multiple times. This option is incompatible with the <B>-c</B> option.
</DL>

<P>
<P>



<B>-D</B>

<P>
<DL COMPACT><DT><DD>
Imports destroyed pool. The <B>-f</B> option is also required.
</DL>

<P>
<P>



<B>-f</B>

<P>
<DL COMPACT><DT><DD>
Forces import, even if the pool appears to be potentially active.
</DL>

<P>
<P>



<B>-F</B>

<P>
<DL COMPACT><DT><DD>
Recovery mode for a non-importable pool. Attempt to return the pool to an importable state by discarding the last few transactions. Not all damaged pools can be recovered by using this option. If successful, the data from the discarded transactions is irretrievably lost. This option is ignored if the pool is importable or already imported.
</DL>

<P>
<P>



<B>-R</B> <I>root</I>

<P>
<DL COMPACT><DT><DD>
Sets the &quot;<B>cachefile</B>&quot; property to &quot;<B>none</B>&quot; and the &quot;<I>altroot</I>&quot; property to &quot;<I>root</I>&quot;.
</DL>

<P>
<P>



<B>-n</B>

<P>
<DL COMPACT><DT><DD>
Used with the <B>-F</B> recovery option. Determines whether a non-importable pool can be made importable again, but does not actually perform the pool recovery. For more details about pool recovery mode, see the <B>-F</B> option, above.
</DL>

<P>
<P>



<B>-X</B>

<P>
<DL COMPACT><DT><DD>
Used with the <B>-F</B> recovery option. Determines whether extreme measures to find a valid txg should take place.  This allows the pool to be rolled back to a txg which is no longer guaranteed to be consistent.  Pools imported at an inconsistent txg may contain uncorrectable checksum errors.  For more details about pool recovery mode, see the <B>-F</B> option, above.
<B>WARNING</B>: This option can be extremely hazardous to the health of your pool and should only be used as a last resort.
</DL>

<P>
<P>



<B>-T</B>

<P>
<DL COMPACT><DT><DD>
Specify the txg to use for rollback.  Implies <B>-FX</B>. For more details about pool recovery mode, see the <B>-X</B> option, above.
<B>WARNING</B>: This option can be extremely hazardous to the health of your pool and should only be used as a last resort.
</DL>

<P>
<P>



<B>-t</B>

<P>
<DL COMPACT><DT><DD>
Used with &quot;<B>newpool</B>&quot;. Specifies that &quot;<B>newpool</B>&quot; is temporary. Temporary pool names last until export. Ensures that the original pool name will be used in all label updates and therefore is retained upon export. Will also set -o cachefile=none when not explicitly specified.
</DL>

<P>
<P>



<B>-m</B>

<P>
<DL COMPACT><DT><DD>
Allows a pool to import when there is a missing log device.
</DL>

<P>
</DL>

<P>
<P>



<B>zpool iostat</B> [<B>-T</B> <B>d</B> | <B>u</B>] [<B>-gLPvy</B>] [<I>pool</I>] ... [<I>interval</I>[<I>count</I>]]

<P>
<DL COMPACT><DT><DD>
Displays <B>I/O</B> statistics for the given pools. When given an interval, the statistics are printed every <I>interval</I> seconds until <B>Ctrl-C</B> is pressed. If no <I>pools</I> are specified, statistics for every pool in the system is shown. If <I>count</I> is specified, the command exits after <I>count</I> reports are printed.
<P>



<B>-T</B> <B>u</B> | <B>d</B>

<DL COMPACT><DT><DD>

Display a time stamp.
<P>
Specify <B>u</B> for a printed representation of the internal representation of time. See <B><A HREF="../man2/time.2.html">time</A></B>(2). Specify <B>d</B> for standard date format. See <B><A HREF="../man1/date.1.html">date</A></B>(1).
</DL>

<P>
<P>



<B>-g</B>

<DL COMPACT><DT><DD>

Display vdev GUIDs instead of the normal device names. These GUIDs can be used in place of device names for the zpool detach/offline/remove/replace commands.
</DL>

<P>
<P>



<B>-L</B>

<DL COMPACT><DT><DD>

Display real paths for vdevs resolving all symbolic links. This can be used to look up the current block device name regardless of the /dev/disk/ path used to open it.
</DL>

<P>
<P>



<B>-P</B>

<DL COMPACT><DT><DD>

Display full paths for vdevs instead of only the last component of the path.  This can be used in conjunction with the <B>-L</B> flag.
</DL>

<P>
<P>



<B>-v</B>

<DL COMPACT><DT><DD>

Verbose statistics. Reports usage statistics for individual <I>vdevs</I> within the pool, in addition to the pool-wide statistics.
</DL>

<P>
<P>



<B>-y</B>

<DL COMPACT><DT><DD>

Omit statistics since boot.  Normally the first line of output reports the statistics since boot.  This option suppresses that first line of output.
</DL>

<P>
</DL>

<P>
<P>



<B>zpool labelclear</B> [<B>-f</B>] <I>device</I>

<P>
<DL COMPACT><DT><DD>
Removes ZFS label information from the specified device. The device must not be part of an active pool configuration.
<P>



<B>-f</B>

<DL COMPACT><DT><DD>

Treat exported or foreign devices as inactive.
</DL>

<P>
</DL>

<P>
<P>



<B>zpool list</B> [<B>-T</B> <B>d</B> | <B>u</B>] [<B>-HgLPv</B>] [<B>-o</B> <I>props</I>[,...]] [<I>pool</I>] ... [<I>interval</I>[<I>count</I>]]

<P>
<DL COMPACT><DT><DD>
Lists the given pools along with a health status and space usage. If no <I>pools</I> are specified, all pools in the system are listed. When given an <I>interval</I>, the information is printed every <I>interval</I> seconds until <B>Ctrl-C</B> is pressed. If <I>count</I> is specified, the command exits after <I>count</I> reports are printed.
<P>



<B>-H</B>

<DL COMPACT><DT><DD>

Scripted mode. Do not display headers, and separate fields by a single tab instead of arbitrary space.
</DL>

<P>
<P>



<B>-g</B>

<DL COMPACT><DT><DD>

Display vdev GUIDs instead of the normal device names. These GUIDs can be used in place of device names for the zpool detach/offline/remove/replace commands.
</DL>

<P>
<P>



<B>-L</B>

<DL COMPACT><DT><DD>

Display real paths for vdevs resolving all symbolic links. This can be used to look up the current block device name regardless of the /dev/disk/ path used to open it.
</DL>

<P>
<P>



<B>-P</B>

<DL COMPACT><DT><DD>

Display full paths for vdevs instead of only the last component of the path.  This can be used in conjunction with the <B>-L</B> flag.
</DL>

<P>



<B>-T</B> <B>d</B> | <B>u</B>

<DL COMPACT><DT><DD>

Display a time stamp.
<P>
Specify <B>u</B> for a printed representation of the internal representation of time. See <B><A HREF="../man2/time.2.html">time</A></B>(2). Specify <B>d</B> for standard date format. See <B><A HREF="../man1/date.1.html">date</A></B>(1).
</DL>

<P>
<P>



<B>-o</B> <I>props</I>

<DL COMPACT><DT><DD>

Comma-separated list of properties to display. See the &quot;Properties&quot; section for a list of valid properties. The default list is &quot;name, size, used, available, fragmentation, expandsize, capacity, dedupratio, health, altroot&quot;
</DL>

<P>
<P>



<B>-v</B>

<DL COMPACT><DT><DD>

Verbose statistics. Reports usage statistics for individual <I>vdevs</I> within the pool, in addition to the pool-wise statistics.
</DL>

<P>
</DL>

<P>
<P>



<B>zpool offline</B> [<B>-t</B>] <I>pool</I> <I>device</I> ...

<P>
<DL COMPACT><DT><DD>
Takes the specified physical device offline. While the <I>device</I> is offline, no attempt is made to read or write to the device.
<P>
This command is not applicable to spares or cache devices.
<P>



<B>-t</B>

<DL COMPACT><DT><DD>

Temporary. Upon reboot, the specified physical device reverts to its previous state.
</DL>

<P>
</DL>

<P>
<P>



<B>zpool online</B> [<B>-e</B>] <I>pool</I> <I>device</I>...

<P>
<DL COMPACT><DT><DD>
Brings the specified physical device online.
<P>
This command is not applicable to spares or cache devices.
<P>



<B>-e</B>

<DL COMPACT><DT><DD>

Expand the device to use all available space. If the device is part of a mirror or <B>raidz</B> then all devices must be expanded before the new space will become available to the pool.
</DL>

<P>
</DL>

<P>
<P>



<B>zpool reguid</B> <I>pool</I>

<P>
<DL COMPACT><DT><DD>
Generates a new unique identifier for the pool. You must ensure that all
devices in this pool are online and healthy before performing this action.
</DL>

<P>
<P>


<B>zpool reopen</B> <I>pool</I>

<P>
<DL COMPACT><DT><DD>
Reopen all the vdevs associated with the pool.
</DL>

<P>
<P>


<B>zpool remove</B> <I>pool</I> <I>device</I> ...

<P>
<DL COMPACT><DT><DD>
Removes the specified device from the pool. This command currently only supports removing hot spares, cache, and log devices. A mirrored log device can be removed by specifying the top-level mirror for the log. Non-log devices that are part of a mirrored configuration can be removed using the <B>zpool detach</B> command. Non-redundant and <B>raidz</B> devices cannot be removed from a pool.
</DL>

<P>
<P>



<B>zpool replace</B> [<B>-f</B>] [<B>-o</B> <I>property=value</I>] <I>pool</I> <I>old_device</I> [<I>new_device</I>]

<P>
<DL COMPACT><DT><DD>
Replaces <I>old_device</I> with <I>new_device</I>. This is equivalent to attaching <I>new_device</I>, waiting for it to resilver, and then detaching <I>old_device</I>.
<P>
The size of <I>new_device</I> must be greater than or equal to the minimum size of all the devices in a mirror or <B>raidz</B> configuration.
<P>
<I>new_device</I> is required if the pool is not redundant. If <I>new_device</I> is not specified, it defaults to <I>old_device</I>. This form of replacement is useful after an existing disk has failed and has been physically replaced. In this case, the new disk may have the same <B>/dev</B> path as the old device, even though it is actually a different disk. <B>ZFS</B> recognizes this.
<P>



<B>-f</B>

<DL COMPACT><DT><DD>

Forces use of <I>new_device</I>, even if its appears to be in use. Not all devices can be overridden in this manner.
</DL>

<P>
<P>



<B>-o</B> <I>property=value</I>

<P>
<DL COMPACT><DT><DD>
Sets the given pool properties. See the &quot;Properties&quot; section for a list of valid properties that can be set. The only property supported at the moment is <B>ashift</B>.  <B>Do note</B> that some properties (among them <B>ashift</B>) are <I>not</I> inherited from a previous vdev. They are vdev specific, not pool specific.
</DL>

<P>
</DL>

<P>
<P>



<B>zpool scrub</B> [<B>-s</B>] <I>pool</I> ...

<P>
<DL COMPACT><DT><DD>
Begins a scrub. The scrub examines all data in the specified pools to verify that it checksums correctly. For replicated (mirror or <B>raidz</B>) devices, <B>ZFS</B> automatically repairs any damage discovered during the scrub. The &quot;<B>zpool status</B>&quot; command reports the progress of the scrub and summarizes the results of the scrub upon completion.
<P>
Scrubbing and resilvering are very similar operations. The difference is that resilvering only examines data that <B>ZFS</B> knows to be out of date (for example, when attaching a new device to a mirror or replacing an existing device), whereas scrubbing examines all data to discover silent errors due to hardware faults or disk failure.
<P>
Because scrubbing and resilvering are <B>I/O</B>-intensive operations, <B>ZFS</B> only allows one at a time. If a scrub is already in progress, the &quot;<B>zpool scrub</B>&quot; command terminates it and starts a new scrub. If a resilver is in progress, <B>ZFS</B> does not allow a scrub to be started until the resilver completes.
<P>



<B>-s</B>

<DL COMPACT><DT><DD>

Stop scrubbing.
</DL>

<P>
</DL>

<P>
<P>



<B>zpool set</B> <I>property</I>=<I>value</I> <I>pool</I>

<P>
<DL COMPACT><DT><DD>
Sets the given property on the specified pool. See the &quot;Properties&quot; section for more information on what properties can be set and acceptable values.
</DL>

<P>
<P>



<B>zpool split</B> [<B>-gLnP</B>] [<B>-R</B> <I>altroot</I>] [<B>-o</B> <I>property=value</I>] <I>pool</I> <I>newpool</I> [<I>device</I> ...]

<P>
<DL COMPACT><DT><DD>
Split devices off <I>pool</I> creating <I>newpool</I>. All <B>vdev</B>s in <I>pool</I> must be mirrors and the pool must not be in the process of resilvering. At the time of the split, <I>newpool</I> will be a replica of <I>pool</I>. By default, the last device in each mirror is split from <I>pool</I> to create <I>newpool</I>.
<P>
The optional <I>device</I> specification causes the specified device(s) to be included in the new pool and, should any devices remain unspecified, the last device in each mirror is used as would be by default.
<P>
<P>



<B>-g</B>

<DL COMPACT><DT><DD>

Display vdev GUIDs instead of the normal device names. These GUIDs can be used in place of device names for the zpool detach/offline/remove/replace commands.
</DL>

<P>
<P>



<B>-L</B>

<DL COMPACT><DT><DD>

Display real paths for vdevs resolving all symbolic links. This can be used to look up the current block device name regardless of the /dev/disk/ path used to open it.
</DL>

<P>
<P>



<B>-n</B> 

<P>
<DL COMPACT><DT><DD>
Do dry run, do not actually perform the split. Print out the expected configuration of <I>newpool</I>.
</DL>

<P>
<P>



<B>-P</B>

<DL COMPACT><DT><DD>

Display full paths for vdevs instead of only the last component of the path.  This can be used in conjunction with the <B>-L</B> flag.
</DL>

<P>
<P>



<B>-R</B> <I>altroot</I> 

<P>
<DL COMPACT><DT><DD>
Set <I>altroot</I> for <I>newpool</I> and automaticaly import it.  This can be useful to avoid mountpoint collisions if <I>newpool</I> is imported on the same filesystem as <I>pool</I>.
</DL>

<P>
<P>



<B>-o</B> <I>property=value</I> 

<P>
<DL COMPACT><DT><DD>
Sets the specified property for <I>newpool</I>. See the “Properties” section for more information on the available pool properties.
</DL>

<P>
</DL>

<P>
<P>



<B>zpool status</B> [<B>-gLPvxD</B>] [<B>-T</B> d | u] [<I>pool</I>] ... [<I>interval</I> [<I>count</I>]]

<P>
<DL COMPACT><DT><DD>
Displays the detailed health status for the given pools. If no <I>pool</I> is specified, then the status of each pool in the system is displayed. For more information on pool and device health, see the &quot;Device Failure and Recovery&quot; section.
<P>
If a scrub or resilver is in progress, this command reports the percentage done and the estimated time to completion. Both of these are only approximate, because the amount of data in the pool and the other workloads on the system can change.
<P>
<P>



<B>-g</B>

<DL COMPACT><DT><DD>

Display vdev GUIDs instead of the normal device names. These GUIDs can be used innplace of device names for the zpool detach/offline/remove/replace commands.
</DL>

<P>
<P>



<B>-L</B>

<DL COMPACT><DT><DD>

Display real paths for vdevs resolving all symbolic links. This can be used to look up the current block device name regardless of the /dev/disk/ path used to open it.
</DL>

<P>
<P>



<B>-P</B>

<DL COMPACT><DT><DD>

Display full paths for vdevs instead of only the last component of the path.  This can be used in conjunction with the <B>-L</B> flag.
</DL>

<P>
<P>



<B>-v</B>

<DL COMPACT><DT><DD>

Displays verbose data error information, printing out a complete list of all data errors since the last complete pool scrub.
</DL>

<P>
<P>



<B>-x</B>

<DL COMPACT><DT><DD>

Only display status for pools that are exhibiting errors or are otherwise unavailable. Warnings about pools not using the latest on-disk format will not be included.
</DL>

<P>
<P>



<B>-D</B>

<DL COMPACT><DT><DD>

Display a histogram of deduplication statistics, showing the allocated (physically present on disk) and
referenced (logically referenced in the pool) block counts and sizes by reference count.
</DL>

<P>
<P>



<B>-T</B> <B>d</B> | <B>u</B>

<DL COMPACT><DT><DD>

Display a time stamp.
<P>
Specify <B>u</B> for a printed representation of the internal representation of time. See <B><A HREF="../man2/time.2.html">time</A></B>(2). Specify <B>d</B> for standard date format. See <B><A HREF="../man1/date.1.html">date</A></B>(1).
</DL>

<P>
<P>



<B>zpool upgrade</B>

<P>
<DL COMPACT><DT><DD>
Displays pools which do not have all supported features enabled and pools formatted using a legacy ZFS version number. These pools can continue to be used, but some features may not be available. Use &quot;<B>zpool upgrade -a</B>&quot; to enable all features on all pools.
</DL>

<P>
<P>



<B>zpool upgrade</B> <B>-v</B>

<P>
<DL COMPACT><DT><DD>
Displays legacy <B>ZFS</B> versions supported by the current software. See <B><A HREF="../man5/zfs-features.5.html">zfs-features</A></B>(5) for a description of feature flags features supported by the current software.
</DL>

<P>
<P>



<B>zpool upgrade</B> [<B>-V</B> <I>version</I>] <B>-a</B> | <I>pool</I> ...

<P>
<DL COMPACT><DT><DD>
Enables all supported features on the given pool. Once this is done, the pool will no longer be accessible on systems that do not support feature flags. See <B><A HREF="../man5/zfs-features.5.html">zfs-features</A></B>(5) for details on compatibility with systems that support feature flags, but do not support all features enabled on the pool.
<P>



<B>-a</B>

<DL COMPACT><DT><DD>

Enables all supported features on all pools.
</DL>

<P>
<P>



<B>-V</B> <I>version</I>

<DL COMPACT><DT><DD>

Upgrade to the specified legacy version. If the <B>-V</B> flag is specified, no features will be enabled on the pool. This option can only be used to increase the version number up to the last supported legacy version number.
</DL>

<P>
</DL>

<P>
</DL>
<A NAME="lbAL">&nbsp;</A>
<H2>EXAMPLES</H2>

<P>

<B>Example 1 </B>Creating a RAID-Z Storage Pool
<P>
<P>

The following command creates a pool with a single <B>raidz</B> root <I>vdev</I> that consists of six disks.
<P>
<P>

<PRE>
# <B>zpool create tank raidz sda sdb sdc sdd sde sdf</B>
</PRE>


<P>
<P>
<P>

<B>Example 2 </B>Creating a Mirrored Storage Pool
<P>
<P>

The following command creates a pool with two mirrors, where each mirror contains two disks.
<P>
<P>

<PRE>
# <B>zpool create tank mirror sda sdb mirror sdc sdd</B>
</PRE>


<P>
<P>
<P>

<B>Example 3 </B>Creating a ZFS Storage Pool by Using Partitions
<P>
<P>

The following command creates an unmirrored pool using two disk partitions.
<P>
<P>

<PRE>
# <B>zpool create tank sda1 sdb2</B>
</PRE>


<P>
<P>
<P>

<B>Example 4 </B>Creating a ZFS Storage Pool by Using Files
<P>
<P>

The following command creates an unmirrored pool using files. While not recommended, a pool based on files can be useful for experimental purposes.
<P>
<P>

<PRE>
# <B>zpool create tank /path/to/file/a /path/to/file/b</B>
</PRE>


<P>
<P>
<P>

<B>Example 5 </B>Adding a Mirror to a ZFS Storage Pool
<P>
<P>

The following command adds two mirrored disks to the pool <I>tank</I>, assuming the pool is already made up of two-way mirrors. The additional space is immediately available to any datasets within the pool.
<P>
<P>

<PRE>
# <B>zpool add tank mirror sda sdb</B>
</PRE>


<P>
<P>
<P>

<B>Example 6 </B>Listing Available ZFS Storage Pools
<P>
<P>

The following command lists all available pools on the system. In this case, the pool <I>zion</I> is faulted due to a missing device.
<P>
<P>
<P>

The results from this command are similar to the following:
<P>
<P>

<PRE>
# <B>zpool list</B>
NAME    SIZE  ALLOC   FREE   FRAG  EXPANDSZ    CAP  DEDUP  HEALTH  ALTROOT
rpool  19.9G  8.43G  11.4G    33%         -    42%  1.00x  ONLINE  -
tank   61.5G  20.0G  41.5G    48%         -    32%  1.00x  ONLINE  -
zion       -      -      -      -         -      -      -  FAULTED -
</PRE>


<P>
<P>
<P>

<B>Example 7 </B>Destroying a ZFS Storage Pool
<P>
<P>

The following command destroys the pool <I>tank</I> and any datasets contained within.
<P>
<P>

<PRE>
# <B>zpool destroy -f tank</B>
</PRE>


<P>
<P>
<P>

<B>Example 8 </B>Exporting a ZFS Storage Pool
<P>
<P>

The following command exports the devices in pool <I>tank</I> so that they can be relocated or later imported.
<P>
<P>

<PRE>
# <B>zpool export tank</B>
</PRE>


<P>
<P>
<P>

<B>Example 9 </B>Importing a ZFS Storage Pool
<P>
<P>

The following command displays available pools, and then imports the pool <I>tank</I> for use on the system.
<P>
<P>
<P>

The results from this command are similar to the following:
<P>
<P>

<PRE>
# <B>zpool import</B>
  pool: tank
    id: 15451357997522795478
 state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:

        tank        ONLINE
          mirror    ONLINE
            sda     ONLINE
            sdb     ONLINE

# <B>zpool import tank</B>
</PRE>


<P>
<P>
<P>

<B>Example 10 </B>Upgrading All ZFS Storage Pools to the Current Version
<P>
<P>

The following command upgrades all ZFS Storage pools to the current version of the software.
<P>
<P>

<PRE>
# <B>zpool upgrade -a</B>
This system is currently running ZFS pool version 28.
</PRE>


<P>
<P>
<P>

<B>Example 11 </B>Managing Hot Spares
<P>
<P>

The following command creates a new pool with an available hot spare:
<P>
<P>

<PRE>
# <B>zpool create tank mirror sda sdb spare sdc</B>
</PRE>


<P>
<P>
<P>
<P>

If one of the disks were to fail, the pool would be reduced to the degraded state. The failed device can be replaced using the following command:
<P>
<P>

<PRE>
# <B>zpool replace tank sda sdd</B>
</PRE>


<P>
<P>
<P>
<P>

Once the data has been resilvered, the spare is automatically removed and is made available for use should another device fails. The hot spare can be permanently removed from the pool using the following command:
<P>
<P>

<PRE>
# <B>zpool remove tank sdc</B>
</PRE>


<P>
<P>
<P>

<B>Example 12 </B>Creating a ZFS Pool with Mirrored Separate Intent Logs
<P>
<P>

The following command creates a ZFS storage pool consisting of two, two-way mirrors and mirrored log devices:
<P>
<P>

<PRE>
# <B>zpool create pool mirror sda sdb mirror sdc sdd log mirror \
   sde sdf</B>
</PRE>


<P>
<P>
<P>

<B>Example 13 </B>Adding Cache Devices to a ZFS Pool
<P>
<P>

The following command adds two disks for use as cache devices to a ZFS storage pool:
<P>
<P>

<PRE>
# <B>zpool add pool cache sdc sdd</B>
</PRE>


<P>
<P>
<P>
<P>

Once added, the cache devices gradually fill with content from main memory. Depending on the size of your cache devices, it could take over an hour for them to fill. Capacity and reads can be monitored using the <B>iostat</B> option as follows: 
<P>
<P>

<PRE>
# <B>zpool iostat -v pool 5</B>
</PRE>


<P>
<P>
<P>

<B>Example 14 </B>Removing a Mirrored Log Device
<P>
<P>

The following command removes the mirrored log device <B>mirror-2</B>.
<P>
<P>
<P>

Given this configuration:
<P>
<P>

<PRE>
   pool: tank
  state: ONLINE
  scrub: none requested
config:

         NAME        STATE     READ WRITE CKSUM
         tank        ONLINE       0     0     0
           mirror-0  ONLINE       0     0     0
             sda     ONLINE       0     0     0
             sdb     ONLINE       0     0     0
           mirror-1  ONLINE       0     0     0
             sdc     ONLINE       0     0     0
             sdd     ONLINE       0     0     0
         logs
           mirror-2  ONLINE       0     0     0
             sde     ONLINE       0     0     0
             sdf     ONLINE       0     0     0
</PRE>


<P>
<P>
<P>
<P>

The command to remove the mirrored log <B>mirror-2</B> is:
<P>
<P>

<PRE>
# <B>zpool remove tank mirror-2</B>
</PRE>


<P>
<P>
<P>

<B>Example 15 </B>Displaying expanded space on a device
<P>
<P>

The following command displays the detailed information for the <I>data</I>
pool. This pool is comprised of a single <I>raidz</I> vdev where one of its
devices increased its capacity by 10GB. In this example, the pool will not 
be able to utilized this extra capacity until all the devices under the
<I>raidz</I> vdev have been expanded.
<P>
<P>

<PRE>
# <B>zpool list -v data</B>
NAME         SIZE  ALLOC   FREE   FRAG  EXPANDSZ    CAP  DEDUP  HEALTH  ALTROOT
data        23.9G  14.6G  9.30G    48%         -    61%  1.00x  ONLINE  -
  raidz1    23.9G  14.6G  9.30G    48%         -
    c1t1d0      -      -      -      -         -
    c1t2d0      -      -      -      -       10G
    c1t3d0      -      -      -      -         -
</PRE>


<P>
<A NAME="lbAM">&nbsp;</A>
<H2>EXIT STATUS</H2>

<P>
<P>

The following exit values are returned:
<P>



<B>0</B>

<DL COMPACT><DT><DD>

Successful completion. 
</DL>

<P>
<P>



<B>1</B>

<DL COMPACT><DT><DD>

An error occurred.
</DL>

<P>
<P>



<B>2</B>

<DL COMPACT><DT><DD>

Invalid command line options were specified.
</DL>

<P>
<A NAME="lbAN">&nbsp;</A>
<H2>ENVIRONMENT VARIABLES</H2>

<DL COMPACT>
<DT><B>ZFS_ABORT</B>

<DD>
Cause <B>zpool</B> to dump core on exit for the purposes of running <B>::findleaks</B>.
<DT><B>ZPOOL_IMPORT_PATH</B>

<DD>
The search path for devices or files to use with the pool. This is a colon-separated list of directories in which <B>zpool</B> looks for device nodes and files.
Similar to the <B>-d</B> option in <I>zpool import</I>.
<DT><B>ZPOOL_VDEV_NAME_GUID</B>

<DD>
Cause <B>zpool</B> subcommands to output vdev guids by default.  This behavior
is identical to the <B>zpool status -g</B> command line option.
<DT><B>ZPOOL_VDEV_NAME_FOLLOW_LINKS</B>

<DD>
Cause <B>zpool</B> subcommands to follow links for vdev names by default.  This behavior is identical to the <B>zpool status -L</B> command line option.
<DT><B>ZPOOL_VDEV_NAME_PATH</B>

<DD>
Cause <B>zpool</B> subcommands to output full vdev path names by default.  This
behavior is identical to the <B>zpool status -p</B> command line option.
<P>
</DL>
<A NAME="lbAO">&nbsp;</A>
<H2>SEE ALSO</H2>

<P>
<P>

<B><A HREF="../man8/zfs.8.html">zfs</A></B>(8), <B><A HREF="../man5/zpool-features.5.html">zpool-features</A></B>(5), <B><A HREF="../man5/zfs-events.5.html">zfs-events</A></B>(5)
<P>

</BODY>
</HTML>
